package com.molyfun.parents.rest.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.molyfun.parents.rest.BaseResponse;

import java.util.List;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:10/24/16.
 */
public class ProductDetailInfoResponse extends BaseResponse{

    private ProductDetailInfoBean data;

    public ProductDetailInfoBean getData() {
        return data;
    }

    public void setData(ProductDetailInfoBean data) {
        this.data = data;
    }

    public static class ProductDetailInfoBean implements Parcelable {

        private String id;

        private String name;

        private long begindatetime;

        private long enddatetime;

        private double price;

        private int sellcount;

        private String introduce;

        private String degree;

        private int commenttimes;

        private int medianum;

        private int livenum;

        private boolean purchasestatus;

        private List<TeacherDetailResponse.TeacherDetailBean> userlist;

        public List<TeacherDetailResponse.TeacherDetailBean> getUserList() {
            return userlist;
        }

        public void setData(List<TeacherDetailResponse.TeacherDetailBean> userList) {
            this.userlist = userlist;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public long getBegindatetime() {
            return begindatetime;
        }

        public void setBegindatetime(long begindatetime) {
            this.begindatetime = begindatetime;
        }

        public long getEnddatetime() {
            return enddatetime;
        }

        public void setEnddatetime(long enddatetime) {
            this.enddatetime = enddatetime;
        }

        public double getPrice() {
            return price;
        }

        public void setPrice(double price) {
            this.price = price;
        }

        public int getSellcount() {
            return sellcount;
        }

        public void setSellcount(int sellcount) {
            this.sellcount = sellcount;
        }

        public String getIntroduce() {
            return introduce;
        }

        public void setIntroduce(String introduce) {
            this.introduce = introduce;
        }

        public String getDegree() {
            return degree;
        }

        public void setDegree(String degree) {
            this.degree = degree;
        }

        public int getCommenttimes() {
            return commenttimes;
        }

        public void setCommenttimes(int commenttimes) {
            this.commenttimes = commenttimes;
        }

        public int getMedianum() {
            return medianum;
        }

        public void setMedianum(int medianum) {
            this.medianum = medianum;
        }

        public int getLivenum() {
            return livenum;
        }

        public void setLivenum(int livenum) {
            this.livenum = livenum;
        }

        public boolean isPurchasestatus() {
            return purchasestatus;
        }

        public void setPurchasestatus(boolean purchasestatus) {
            this.purchasestatus = purchasestatus;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.name);
            dest.writeLong(this.begindatetime);
            dest.writeLong(this.enddatetime);
            dest.writeDouble(this.price);
            dest.writeInt(this.sellcount);
            dest.writeString(this.introduce);
            dest.writeString(this.degree);
            dest.writeInt(this.commenttimes);
            dest.writeInt(this.medianum);
            dest.writeInt(this.livenum);
            dest.writeByte(this.purchasestatus ? (byte) 1 : (byte) 0);
            dest.writeTypedList(this.userlist);
        }

        public ProductDetailInfoBean() {
        }

        protected ProductDetailInfoBean(Parcel in) {
            this.id = in.readString();
            this.name = in.readString();
            this.begindatetime = in.readLong();
            this.enddatetime = in.readLong();
            this.price = in.readDouble();
            this.sellcount = in.readInt();
            this.introduce = in.readString();
            this.degree = in.readString();
            this.commenttimes = in.readInt();
            this.medianum = in.readInt();
            this.livenum = in.readInt();
            this.purchasestatus = in.readByte() != 0;
            this.userlist = in.createTypedArrayList(TeacherDetailResponse.TeacherDetailBean.CREATOR);
        }

        public static final Parcelable.Creator<ProductDetailInfoBean> CREATOR = new Parcelable.Creator<ProductDetailInfoBean>() {
            @Override
            public ProductDetailInfoBean createFromParcel(Parcel source) {
                return new ProductDetailInfoBean(source);
            }

            @Override
            public ProductDetailInfoBean[] newArray(int size) {
                return new ProductDetailInfoBean[size];
            }
        };
    }


}
